package cn.wanda.bi.sunshine.platform.server.client;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by wangfupeng1
 */
@FeignClient(name = "ffan", url = "${client.ffan.url:}")
public interface FFanClient {

    //发送短信验证码
    @RequestMapping(method = {RequestMethod.POST}, value = {"/userplatform/v1/verifyCodes"})
    String sendSMSCode(@RequestParam("mobile") String mobile,
                       @RequestParam("appid") String appid,
                       @RequestParam("type") Integer type);

    //校验验证码
    @RequestMapping(method = {RequestMethod.GET}, value = {"/userplatform/v1/verifyCodes/statuses"})
    String checkVerifyCode(@RequestParam("mobile") String mobile,
                           @RequestParam("type") int type,
                           @RequestParam("verifyCode") String verifyCode,
                           @RequestParam("appid") String appid);

}
